// 引入基础模块 vue router
import Vue from 'vue'
import VueRouter from 'vue-router'
//  注册使用路由
Vue.use(VueRouter)

const routes = [
    {path:"/",redirect:"/home"},
    {path:"/home",component:()=>import('@/components/home')},
    {path:"/my",component:()=>import('@/components/my'),
     redirect:'/wangzhan',
     children:[
      {path:"/wangzhan",component:()=>import('@/components/wangzhan')},
      {path:"/vip",component:()=>import('@/components/vip')},
      {path:"/cate",component:()=>import('@/components/cate')},
     ]
  },

]

const router = new VueRouter({
  routes
})

// 配置路由
export default router